package com.zj.syzs.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;

import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
import com.nostra13.universalimageloader.core.display.RoundedBitmapDisplayer;
import com.zj.shouyou.R;
import com.zj.syzs.bean.InfoBean;
import com.zj.syzs.utils.ImageDownLoader;

import java.util.List;

/**
 * Created by ZJ on 2015/6/18 0018.
 */
public class InfoAdapter extends AppAdapter<InfoBean>{
    private ImageDownLoader task;
    private DisplayImageOptions options;

    public InfoAdapter(List<InfoBean> list, Context context) {
        super(list, context);
        task = new ImageDownLoader(context);
        ImageLoader.getInstance().init(ImageLoaderConfiguration.createDefault(context));
        DisplayImageOptions.Builder builder = new DisplayImageOptions.Builder();
        builder.showImageOnLoading(R.mipmap.ic_launcher);
        builder.showImageOnFail(R.mipmap.ic_launcher);
        builder.cacheInMemory(true).cacheOnDisk(true);
        builder.displayer(new RoundedBitmapDisplayer(20));
        options = builder.build();
    }

    @Override
    public View createView(int position, View convertView, ViewGroup parent) {
        return null;
    }
}
